'use strict';
exports.main = async (event, context) => {
	const SECRET = '61ed6362a1864989c1bea524cb38ab0f'
	const APPID = 'wx7c72ae2b24bd5ca2'
	const appid_url =
		'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid='+ APPID +'&secret=' + SECRET
	const access_token_res = await uniCloud.httpclient.request(appid_url, {
		method: 'GET',
		contentType: 'json', // 指定以application/json发送data内的数据
		dataType: 'json' // 指定返回值为json格式，自动进行parse
	})
	const access_token = access_token_res.data.access_token;
	return access_token
	
};
